package com.shop.admin.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.shop.admin.valid.AddGroup;
import com.shop.admin.valid.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.math.BigDecimal;
import java.util.Date;
import java.io.Serializable;

/**
 * (ShopOrder)实体类
 *
 * @author makejava
 * @since 2022-09-01 22:09:17
 */
@Data
@TableName("shop_order")
public class ShopOrder implements Serializable {
    private static final long serialVersionUID = -26582771536629734L;
    /**
     * 商品id
     */
    @NotNull(message = "修改必须指定id",groups = {UpdateGroup.class})
    @Null(message = "新增不能指定id",groups = {AddGroup.class})
    @TableId
    private Long orderId;
    /**
     * 商品名字
     */
    @NotBlank(message = "商品名必须提交",groups = {AddGroup.class,UpdateGroup.class})
    private String orderName;
    /**
     * 商品描述
     */
    private String orderDescribed;
    /**
     * 分类id
     */
    @NotBlank(message = "分类必须提交",groups = {AddGroup.class,UpdateGroup.class})
    private Integer catelogId;
    /**
     * 显示状态[0-不显示；1-显示]
     */
//    @TableLogic(value = "1",delval = "0")
    private Long showStatus;
    /**
     * 价格
     */
    @NotNull(groups = {AddGroup.class, UpdateGroup.class})
    private BigDecimal price;
    /**
     * 优惠价
     */
    @NotNull(groups = {AddGroup.class, UpdateGroup.class})
    private BigDecimal priceDiscounts;
    /**
     * 秒杀价
     */
    private BigDecimal priceSeckill;
    /**
     * 成本价
     */
    private BigDecimal priceCost;
    /**
     * 销量
     */
    private Long saleCount;
    /**
     * 秒杀标记
     */
    private Integer seckill;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 更新时间
     */
    private Date updateTime;
    /**
     * 组织id
     */
    private Integer orgId;
    /**
     * 逻辑删除
     */
    private Integer tombstone;

}

